package com.ylbh.modules.commentstar.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ylbh.modules.commentstar.entity.ShoppingCommentStar;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 评价星级信息模板
 *
 * @author czx
 * @date 2019-08-21 14:11:52
 */
@Mapper
@Repository
public interface ShoppingCommentStarMapper extends BaseMapper<ShoppingCommentStar> {

    /**
     * 根据星级查询
     * @param starClass
     * @return
     */
    List<ShoppingCommentStar> selectStarList(@Param(value = "starClass") Integer starClass);

    /**
     * 查询该标签是否已经被运用
     * @param id
     * @return
     */
    int selectCommentClassByStarId(@Param(value = "id") Integer id);

    /**
     * 将状态改为删除状态
     * @param id
     */
    void updateCommentStarById(@Param(value = "id") Integer id);
}
